//Thanks to marcus_civis for this button that saves the current tool with the same file name
// or asks for a new name for ZBrush default tools

[IButton,"???","SV_Tool, NO WARNINGS, IF NAMED, SAVES OVER THE EXISTING TOOL!!",
	[VarSet,toolPath,[ToolGetPath]]
	[If,[StrLength,toolPath],
		[If,([StrFind,"\",toolPath]==-1)&&([StrFind,"/",toolPath]==-1),
			//not a full path - use Save As"
			[IPress,Tool:Save As]
			,//else we have a full path	
			[VarSet,toolPath,[StrMerge,toolPath,".ztl"]]//must add on file extension	
			[FileNameSetNext,toolPath]
			[IPress,Tool:Save As]
			[NoteBar,[StrMerge,toolPath," saved..."]]
		]	//end if
	]//end if
]//end button